﻿<%@ Page Language="C#" AutoEventWireup="true" Inherits="masterdata_Product_detail"
    MasterPageFile="~/MasterPage.master" meta:resourcekey="PageResource1" CodeFile="Product_detail.aspx.cs" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
    <title>产品维护</title>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <table width="100%">
        <tr>
            <td>
                <asp:UpdatePanel ID="UpdatePanel" runat="server">
                    <ContentTemplate>
                        <div>
                            <table style="width: 100%; height: 100%">
                                <tr>
                                    <td style="width: 45%;" valign="top">
                                        <table id="wsd_inputtable" style="width: 100%">
                                            <tr>
                                                <td class="tabletitle" style="height: 21px" width="100%">
                                                    <asp:HiddenField runat="server" ID="hfProductUOM" />
                                                    <span class="keyword">*</span>
                                                    请选择一个系列
                                                </td>
                                            </tr>
                                        </table>
                                        <table id="wsd_listtable" style="width: 100%; height: 280px">
                                            <tr>
                                                <td>
                                                    <div style="height: 100%; overflow-y: auto">
                                                        <asp:TreeView ID="TreeForms" runat="server" ExpandDepth="0" ShowLines="True">
                                                            <SelectedNodeStyle BackColor="Silver" Font-Size="Larger" />
                                                        </asp:TreeView>
                                                    </div>
                                                </td>
                                            </tr>
                                        </table>
                                    </td>
                                    <td valign="top" id="rdRight" runat="server" visible="true">

                                        <table id="wsd_inputtable" width="500px">
                                            <tr>
                                                <td colspan="3" class="tabletitle">
                                                    <font color="red"><b>提示:*为必填项</b></font>
                                                </td>
                                            </tr>

                                            <tr>
                                                <td class="tablefieldkeyword">
                                             
                                                    <asp:Literal runat="server" Text="<%$ resources:language, lbl_ProductCode%>"> </asp:Literal>
                                                </td>
                                                <td>
                                                    <input id="txtCode" type="text" runat="server" class="default" maxlength="20" />
                                                </td>
                                            </tr>
                                            <tr>
                                                <td class="tablefieldkeyword">
                                                    产品全称
                                                </td>
                                                <td>
                                                    <input id="txtName" type="text" runat="server" maxlength="250" width="250px" class="default" />
                                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ErrorMessage="产品名称不能为空！"
                                                        ControlToValidate="txtName" meta:resourcekey="RequiredFieldValidator2Resource1"
                                                        Display="Dynamic" />
                                                </td>
                                            </tr>
                                            <tr>
                                                <td class="tablefieldkeyword">
                                                 产品简称
                                                </td>
                                                <td>
                                                    <input id="txtShortName" type="text" width="150px" class="default" runat="server"
                                                        maxlength="100" />
                                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator11" runat="server" ControlToValidate="txtShortName"
                                                        Display="Dynamic" ErrorMessage="简称不能为空！" meta:resourcekey="RequiredFieldValidator11Resource1" />
                                                </td>
                                            </tr>
                                            <tr>
                                                <td class="tablefield">显示顺序
                                                </td>
                                                <td>
                                                    <input id="txtSort" type="text" width="30px" class="default" runat="server" maxlength="3"
                                                        value="1" />
                                                    <asp:RegularExpressionValidator ID="RegularExpressionValidator4" runat="server" Display="Dynamic"
                                                        ErrorMessage="请输入正整数" ControlToValidate="txtSort" ValidationExpression="^[0-9]*[1-9][0-9]*$" />
                                                </td>
                                            </tr>

                                            <tr>
                                                <td class="tablefieldkeyword">
                                                   <asp:Literal runat="server" Text="<%$ resources:language, lbl_UOM %>"></asp:Literal>
                                                </td>
                                                <td nowrap="nowrap">
                                                    <asp:TextBox runat="server" class="default" ID="txtDefaultUOM" />
                                                     <asp:RequiredFieldValidator runat="server" ControlToValidate="txtDefaultUOM"
                                                          ErrorMessage="请输入最小单位" 
                                                        Display="Dynamic" />
                                                </td>
                                            </tr>
                                            <tr>
                                                <td class="tablefieldkeyword" style="width:250px">最小单位价(元):</td>
                                                <td>
                                                    <asp:TextBox runat="server" OnTextChanged="setText" AutoPostBack="true" class="default" ID="txtPiecePrice" MaxLength="5" />
                                                    <asp:RequiredFieldValidator ID="rfv1" runat="server" ControlToValidate="txtPiecePrice"
                                                        ErrorMessage="请输入最小单位价"
                                                        Display="Dynamic" />
                                                    <asp:RegularExpressionValidator ID="rev2" runat="server" ControlToValidate="txtPiecePrice"
                                                           ErrorMessage="最小单位价错误"
                                                        Display="Dynamic" ValidationExpression="^(\d{1,3}(,\d\d\d)*(\.\d+)?|\d+(\.\d+)?)$" />
                                                </td>
                                            </tr>
                                            <tr>
                                                <td class="tablefieldkeyword" style="width:250px" >大包装规格名称:
                                                </td>
                                                <td>
                                                    <asp:TextBox runat="server" class="default" ID="txtCSName" MaxLength="5" />
                                                       <asp:RequiredFieldValidator  runat="server" ControlToValidate="txtCSName"
                                                        ErrorMessage="请输入大包装规格名称"
                                                        Display="Dynamic" />
                                                </td>
                                            </tr>
                                            <tr>
                                                <td class="tablefieldkeyword" >1个大包装=
                                                </td>
                                                <td style="text-align:left">
                                                    <asp:TextBox ID="txtNum" AutoPostBack="true" class="default" type="text" runat="server"
                                                        MaxLength="5" OnTextChanged="setText" Width="50px" meta:resourcekey="txtNumResource1" />个最小单位规格
                                                        <asp:RequiredFieldValidator runat="server" ControlToValidate="txtNum"
                                                        ErrorMessage="请输入转换数量" Display="Dynamic" />
                                                      <asp:RegularExpressionValidator ID="rev3" runat="server" ControlToValidate="txtNum"
                                                          Display="Dynamic" ErrorMessage="规格转换应为数字!" ValidationExpression="^(\d{1,3}(,\d\d\d)*(\.\d+)?|\d+(\.\d+)?)$" />
                                                    </td>
                                            </tr>
                                            <tr>
                                                <td class="tablefieldkeyword">大包装单价(元):
                                                </td>
                                                <td nowrap="nowrap">
                                                    <input id="txtCasePrice" type="text" class="default" runat="server" width="100" maxlength="10" />
                                                    <asp:RequiredFieldValidator  runat="server" ControlToValidate="txtCasePrice"
                                                        ErrorMessage="请输入大包装单价"
                                                        Display="Dynamic" />
                                                    <asp:RegularExpressionValidator ID="rev1" runat="server" ControlToValidate="txtCasePrice"
                                                        Display="Dynamic" ValidationExpression="^(\d{1,3}(,\d\d\d)*(\.\d+)?|\d+(\.\d+)?)$" />
                                                </td>
                                            </tr>

                                            <tr>
                                                <td class="tablefield">
                                                    <asp:Literal ID="Literal9" runat="server" Text="<%$ resources:language, lbl_Description %>"></asp:Literal>
                                                </td>
                                                <td nowrap="nowrap">
                                                    <asp:TextBox ID="txtRemark" MaxLength="200" Width="400px" runat="server" TextMode="MultiLine"
                                                        Rows="3" Columns="40" />
                                                    <span class="keyword">最多可输入200个字符</span>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td class="tablefield">
                                                    <asp:Literal ID="Literal10" runat="server" Text="<%$ resources:language, lbl_Active %>"></asp:Literal>
                                                </td>
                                                <td nowrap="nowrap">
                                                    <asp:CheckBox ID="chkYesNo" runat="server" Checked="True" />
                                                </td>
                                            </tr>
                                            <%--<tr style=" visibility:hidden">
              <td class="tablefield">
                    <asp:Literal ID="Literal4" Visible="false" runat="server" Text="件体积(M3)"></asp:Literal>
                </td>
                <td nowrap="nowrap"  >
                    <asp:TextBox ID="txtVol" Visible="false" type="text" runat="server" MaxLength="10"
                        meta:resourcekey="txtVolResource1" />
                    <asp:RegularExpressionValidator Visible="false" ID="RegularExpressionValidator5"
                        runat="server"  ErrorMessage=" " ValidationExpression="^(\d{1,3}(,\d\d\d)*(\.\d+)?|\d+(\.\d+)?)$"
                        ControlToValidate="txtVol" meta:resourcekey="RegularExpressionValidator5Resource1"></asp:RegularExpressionValidator>
                </td>
                <td class="tablefield"">
                    <asp:Literal ID="Literal6" runat="server" Visible="false" Text="件重量(KG)"></asp:Literal>
                </td>
                <td>
                </td>
                <td  >
                    <asp:TextBox ID="txtWeight" Visible="false"  class="default" type="text" runat="server" MaxLength="10"
                        meta:resourcekey="txtWeightResource1" />
                    <asp:RegularExpressionValidator Visible="true" ID="RegularExpressionValidator4"
                        runat="server"  ErrorMessage="重量应为数字" ValidationExpression="^(\d{1,3}(,\d\d\d)*(\.\d+)?|\d+(\.\d+)?)$"
                        ControlToValidate="txtWeight" meta:resourcekey="RegularExpressionValidator4Resource1"></asp:RegularExpressionValidator>
                </td>
                <td class="tablefield">
                </td>
                <td nowrap="nowrap">
                </td>
                <td class="tablefield" style="display: none;">
                    <span class="keyword">*</span>规格转换 1自然件=:
                </td>
                <td>
                </td>
                <td nowrap="nowrap" colspan="2">
                    <asp:TextBox ID="txtStandardPrice" Visible="false" type="text" runat="server"   class="default" meta:resourcekey="txtStandardPriceResource1" />
                    <span style="display: none;" class="tablefieldWord">标准箱</span>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator12" Visible="false" runat="server"
                        ErrorMessage="规格转换不能为空"  ControlToValidate="txtStandardPrice" meta:resourcekey="RequiredFieldValidator12Resource1" />
                    <asp:RegularExpressionValidator ID="RegularExpressionValidator6" Visible="false"
                        runat="server" ErrorMessage="规格转换应为数字"  ValidationExpression="^(\d{1,3}(,\d\d\d)*(\.\d+)?|\d+(\.\d+)?)$"
                        ControlToValidate="txtStandardPrice" meta:resourcekey="RegularExpressionValidator6Resource1"></asp:RegularExpressionValidator>
                </td>
            </tr>--%>
                                            <%--    <tr style=" visibility:hidden">
                
                <td class="tablefield">
                    <asp:Literal runat="server" Visible="false" Text="<%$ resources:language, lbl_SellsCase %>"></asp:Literal>
                </td>
                <td nowrap="nowrap"  >
                    <asp:CheckBox ID="cbxSelllFlag" Visible="false" runat="server" Checked="True" meta:resourcekey="cbxSelllFlagResource1" />
                </td>
                <td class="tablefield">
                    <asp:Literal runat="server" Visible="false" Text="<%$ resources:language, lbl_SalesPromotion %>"></asp:Literal>
                </td>
                <td nowrap="nowrap">
                    <asp:CheckBox ID="chkPro" Visible="false" runat="server" meta:resourcekey="chkProResource1" />
                </td>
            </tr>--%>
                                        </table>

                                    </td>
                                </tr>
                            </table>
                            <br />
                            <table id="wsd_listtable" width="100%">
                                <tr>
                                    <td style="width: 100%" colspan="3">
                                        <asp:DataList runat="server" EmptyDataText="没有可显示的数据." RepeatColumns="6" RepeatDirection="Horizontal"
                                            OnItemDataBound="dlPhotos_ItemDataBound" DataKeyField="ID" RepeatLayout="TAble"
                                            Width="99%" ID="dlPhotos" ItemStyle-CssClass="style2">
                                            <ItemTemplate>
                                                <div class="style1">
                                                    <a href='<%#"../../IMAGE.ASPX?"+Eval("PHOTOID")%>' target="_blank" style="text-decoration: none">
                                                        <span style="vertical-align: middle; text-align: center;">
                                                            <img src='<%#"../../SMALLIMAGE.ASPX?H=100&W=100&ID="+Eval("PHOTOID") %>' />
                                                        </span></a>
                                                    <br />
                                                    <div style="text-align: center; padding: 10px">
                                                        <asp:LinkButton runat="server" OnClick="IMAGE_DELETE" CommandArgument='<%# Eval("ID") %>'
                                                            ID="btnDelete" Text="删除"></asp:LinkButton>
                                                    </div>
                                            </ItemTemplate>
                                        </asp:DataList>
                                        <style type="text/css">
                                            .style1
                                            {
                                                font-size: 12px;
                                                line-height: 20px;
                                                border: 1px solid #2BB3D5;
                                                width: 120px;
                                                text-align: center;
                                                padding-top: 10px;
                                            }

                                            .style2
                                            {
                                                padding: 5px;
                                            }

                                            img
                                            {
                                                border: 0;
                                            }
                                        </style>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="pagination" colspan="3">
                                        <b>从图片库中选择</b>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="tablefield">照片类型:
                                    </td>
                                    <td>
                                        <asp:DropDownList ID="drpPhotoType" runat="server" Width="130" DataTextField="name"
                                            DataValueField="dictionaryitemid">
                                        </asp:DropDownList>
                                    </td>
                                    <td class="buttonarea">
                                        <asp:Button ID="btnQuery" CausesValidation="false" runat="server" class="wsd_button2" Text="<%$ resources:language, btn_Query%>"
                                            OnClick="btnQuery_Click" />
                                    </td>
                                </tr>
                                <tr>
                                    <td style="width: 100%" colspan="3">
                                        <div style="overflow: auto">
                                            <asp:DataList runat="server" RepeatColumns="6" EmptyDataText="没有可显示的数据." RepeatDirection="Horizontal"
                                                RepeatLayout="Table" Width="99%" ID="listPhoto" ItemStyle-CssClass="style2">
                                                <ItemTemplate>
                                                    <asp:ImageButton ID="ImageButton1" runat="server" CommandArgument='<%# Eval("ID") %>' OnClick="Select_Image"
                                                        CausesValidation="false" BorderStyle="Solid" ImageUrl='<%# "../../SMALLIMAGE.ASPX?H=100&W=100&ID="+Eval("ID") %>' />
                                                </ItemTemplate>
                                            </asp:DataList>
                                        </div>
                                        <table width="100%" class="pagination" cellpadding="0px" cellspacing="0px" border="0">
                                            <tr>
                                                <td style="height: 32px">
                                                    <div class="wsd_pageleft">
                                                        <asp:Button CssClass="wsd_pagebutton" CommandName="FIRST" ID="btnFirst" runat="server"
                                                            CausesValidation="false" OnClick="btnPage_Click" Text="<%$resources:language,lbl_First_Page %>" />
                                                        <asp:Button CssClass="wsd_pagebutton" CommandName="PREVIOUS" ID="btnPrevious" runat="server"
                                                            CausesValidation="false" OnClick="btnPage_Click" Text="<%$resources:language,lbl_PreviousPage %>" />
                                                        <asp:Button CssClass="wsd_pagebutton" CommandName="NEXT" ID="btnNext" runat="server"
                                                            CausesValidation="false" OnClick="btnPage_Click" Text="<%$resources:language,lbl_NextPage %>" />
                                                        <asp:Button CssClass="wsd_pagebutton" CommandName="LAST" ID="btnLast" runat="server"
                                                            CausesValidation="false" OnClick="btnPage_Click" Text="<%$resources:language,lbl_Last_Page %>" />
                                                    </div>
                                                    <div class="wsd_pageright">
                                                        <asp:Label runat="server" ID="txtInfo"> </asp:Label>
                                                        第<asp:TextBox CssClass="wsd_pageinput" ID="txtPage" runat="server" Width="40px"></asp:TextBox>
                                                        页
                                                    <asp:Button CssClass="wsd_pagegobutton" ID="btnGoto" runat="server" Text="Go" OnClick="btnGoto_Click" />
                                                    </div>
                                                </td>
                                            </tr>
                                        </table>
                                    </td>
                                </tr>
                            </table>
                            <table id="wsd_inputtable">
                                <tr>
                                    <td width="100%" class="tabletitle">
                                        <asp:Literal ID="Literal2" runat="server" Text="<%$ resources:language, lbl_Operation_Area %>"></asp:Literal>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="buttonarea">
                                        <asp:Button ID="btnSave" runat="server" class="wsd_button2" Text="<%$ resources:language, btn_Save %>"
                                            OnClick="btnSave_Click" />&nbsp;&nbsp;
                                    <asp:Button ID="btnCancel" runat="server" class="wsd_button2" Text="<%$ resources:language, btn_Cancel %>"
                                         OnClientClick="location.href='Product_List.aspx';return false;"
                                        CausesValidation="False" />
                                    </td>
                                </tr>
                            </table>

                        </div>
                    </ContentTemplate>
                </asp:UpdatePanel>
            </td>
        </tr>
    </table>
</asp:Content>
